$(document).ready(function () {
});

//注册传送门
function z() {
    window.location.href = "/tj/register";
}

//登录传送门
function d() {
    window.location.href = "/tj/login";
}

// 登录方法
function login() {
    var userName = $(".userName").val();
    var pwd = $(".pwd").val();
    if (userName == "" || pwd == "") {
        window.wxc.xcConfirm("用户名或密码未填写", window.wxc.xcConfirm.typeEnum.error, "登陆失败");
        return;
    }

    $.ajax({
        type: "GET",
        url: "/dev/login",
        data: {userName: userName, pwd: pwd},
        dataType: "json",
        success: function (data) {
            if (data == "true") {
                //$(".alert1").show();
                window.wxc.xcConfirm1("登陆成功！", window.wxc.xcConfirm1.typeEnum.success, "登陆成功");
            } else {
                window.wxc.xcConfirm("账号或密码错误", window.wxc.xcConfirm.typeEnum.error, "登陆失败");
            }
        }
        ,
        error: function (data) {
            alert("系统繁忙，删除失败");
        }
    });
}
//人脸登录
function faceLogin() {
  window.location.href="http://localhost:8089/demo1";
}

function cs() {
    window.location.href = "/tj/userCenter";
}